<%
  deferred_pending_options = {:append_descriptor => nil, :parent_container_type => 'project'}
  done_todo_options = {
    :append_descriptor => t('projects.last_completed_in_project', :number=>prefs.show_number_completed),
    :suppress_project => true,
    :parent_container_type => 'project'
  }
  if @not_done_todos.count == 0
    # force project view so one empty container will be shown with an empty message
    @group_view_by = 'project'
  end
-%>
<div id="display_box">
  <%= project_next_prev %>

  <%= render :partial => "project_settings_container", :locals => {:project => @project} %>

  <%= empty_message_holder("not_done_context", @not_done_todos.empty?) %>

  <%= show_grouped_todos({:collapsible => false, :show_empty_containers => false, :parent_container_type => 'project' }) %>

  <%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>

  <%= show_done_todos(@done, done_todo_options) unless @done.nil? %>

  <div class="container">
    <div id="notes">
      <div class="add_note_link link_in_container_header"><%= link_to t('projects.add_note'), '#' %> </div>
      <h2><%= t('projects.notes') %></h2>
      <div id="empty-n" style="display:<%= @project.notes.empty? ? 'block' : 'none'%>;">
        <div class="message"><p><%= t('projects.no_notes_attached') %></p></div>
      </div>
      <%= render :partial => "notes/notes_summary", :collection => @project.notes %>
    </div>
  </div>

  <div id="new-note" style="display:none;">
    <%= render :partial => "notes/note_edit_form", :object => @new_note, :locals => {:submit_text => t('projects.add_note_submit')} %>
  </div>

</div>

<div id="input_box">
  <%= render :partial => "shared/add_new_item_form" %>
  <%= render :template => "sidebar/sidebar" %>
</div>
